/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.frogs.manager;

import com.frogs.data.AbstractManager;
import com.frogs.exception.FrogsFindException;
import com.frogs.exception.FrogsMergeException;
import com.frogs.exception.FrogsPersistException;
import com.frogs.exception.FrogsRemoveException;
import com.frogs.model.Subcategoria;
import com.frogs.model.SubcategoriaPK;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author gabrielbran
 */
public class ManagerSubCategoria extends AbstractManager {

    public ManagerSubCategoria() {
        super();
    }

    public Subcategoria guardaSubCategoria(Subcategoria s) throws FrogsPersistException {
        return (Subcategoria) super.persistObject(s);
    }

    public Subcategoria actualizaSubCategoria(Subcategoria s) throws FrogsMergeException {
        return (Subcategoria) super.mergeObject(s);
    }

    public void eliminaSubCategoria(Subcategoria s) throws FrogsRemoveException  {
        super.removeObject(s);
    }

    public List<Subcategoria> getListaSubCategorias() throws FrogsFindException {
        return (List<Subcategoria>) super.getEntityList();
    }

    public Subcategoria buscarSubCategoria(SubcategoriaPK spk) throws Exception {
        return (Subcategoria) super.findById(spk);
    }

    @Override
    public EntityManager getEm() {
        return super.getEm();
    }

    @Override
    public String getEntityName() {
        return "Subcategoria";
    }
}
